-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTLP Exported as default for .NET (Core) #343
OTLP Exported as default for .NET (Core) #343
Conversation
it was fixed in #294
Zipkin remains for .NET Framework
make the version compatible with OtelExporter (Grpc.Net.Client)
instead of Grpc.Net.Client for .NET Standard 2.1 from tracer-home
SIG notes: Try to use OTLP over HTTP exporter - check specification and possibility to execute it for all .NET (Core/Framework) versions |
@nrcventura, @pjanotti,
I do not think that we will have possibility to change the defaults after first official release, so it looks like the long term decision. Personally, I think that we should follow strategies directly from the .NET OTEL SDK. When the decision will be made, I will be happy to finish this one or create the new one PR with http/protobud as default. |
I will update the first comment to update curent state. It will be esier to follow our options. |
I opened a discussion with SDK for considering a change for the OTLP default from gRPC to HTTP, see open-telemetry/opentelemetry-dotnet#2855 Thanks for the info @Kielek |
First comment updated. |
Can you explain this a little more? If we only support http/protobuf can we just get away with "hardcoding" some of the public configuration options like users of the SDK might do? I just want to get a better understanding of some of the problems that you are trying to solve. |
I am good with merging this PR if we describe how OTLP exporter can be used (together with its gotchas) in As far as I understand this would require describing that:
We can have a separate PR to switch to HTTP OTLP protocol by default (also for .NET Framework). It would be easier to do it after open-telemetry/opentelemetry-dotnet#2857 is fixed a new version is released. Also, I think that we can keep the support for the gRPC OTLP protocol (with workarounds and constraints described above). But I am also OK to drop support for gRPC completely and just create an issue for it (maybe nobody would need it anyway). |
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.3" /> | ||
|
||
<!-- Hack to make the otel exportert working for .NET 5.0 --> | ||
<PackageReference Include="Grpc.Net.Client" Version="2.32.0" Condition="'$(TargetFramework)' == 'net5.0'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want this merged then it should be documented in USAGE.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI #350
Exporter = source.GetString(ConfigurationKeys.Exporter); | ||
Exporter = source.GetString(ConfigurationKeys.Exporter) ?? | ||
#if NETFRAMEWORK | ||
"zipkin"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, for.NET Framework, we could still use the OTLP exporter, but set HTTP protocol
I think that, I have found pretty cheap alternative to avoid copying whole code related to managing url (lack od auto-extending endpoints with suffix such as /v1/traces or /v1/metrics). I consider is a good tradeoff, especially if open-telemetry/opentelemetry-dotnet#2868 will be merged shortly. Closing this one, #351 constrains expected changes. |
Partially Fixes #325
Relates to #324
Changes proposed in this pull request:
Use the OTLP exporter as default for the .NET (Core) and Zipkin for .NET Framework
Tests
CI
Local tests for ConsoleApp, works fine for
Works with workaround for
Issue to be discussed
https://www.nuget.org/packages/Grpc.Net.Client/2.32.0 used by https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol/1.2.0-rc1 is released for
Otel-dotnet-inturmenation, for now, is released as .NET 4.6.1 and .NET Core App 3.1.
.NET Core App 3.1 is using .NET Standard 2.1 (deploys Grpc.Net.Client to the tracer-home).
.NET Standard 2.1 of Grpc.Net.Client is not working correctly with .NET 5.0. It leads to following error
As a workaround, there is a possibility to force load Grpc.Net.Client for .NET 5.0 from the instrumented application. I think that it is not the long-term sollution.
I think that we should consider separate version of otel-intrumentation for .NET 5.0+.
Alternative solution - defaulting to Otel over http/protobuf
Is it possible, and it is working correctly both for .NET Framework 4.6.1, NET Core App 3.1 and .NET 5.0 without any hacks for the end user, but we should consider following things:
To reduce the complication on our side we can consider fixing open-telemetry/opentelemetry-dotnet#2857 and waiting for the next RC candidate. If it will cover updates by the Protocol setter it will reduce complication of the code on our side.
Discusion about changing default exporter to HTTP
open-telemetry/opentelemetry-dotnet#2855